﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Xml;

namespace KeyCtrl
{
    public partial class ShortcutForm : Form
    {
        private Controller _controller;
        private String _currentLanguage;

        public ShortcutForm(Controller controller)
        {
            InitializeComponent();
            _controller = controller;
            Utils.SetRoundedCorners(this);    
        }

        public void Show(String lanaguage)
        {
            HeaderLabel.Text = "Keybaord shortcuts for " + lanaguage;
            _currentLanguage = lanaguage;
            Show();
        }

        private void ShortcutForm_Load(object sender, EventArgs e)
        {
            /*
            XmlDocument doc = new XmlDocument();
            doc.Load("shortcuts.xml");
            foreach (String tabName in ShortcutReader.GetTabs(doc, _currentLanguage))
            {
                LinkLabel link = new LinkLabel();
                link.Text = tabName;
                tabFlowLayout.Controls.Add(link);
            }
                Label tb;

                tb = new Label();
                tb.ForeColor = System.Drawing.Color.Yellow;
                tb.Text = "CTRL + P:";
                tb.Width = tableLayoutPanel1.Width / 2;
                tb.TextAlign = ContentAlignment.MiddleRight;
                tableLayoutPanel1.Controls.Add(tb, 0, 0);
                tb = new Label();
                tb.Text = "Copy";
                tb.ForeColor = System.Drawing.Color.White;
                tableLayoutPanel1.Controls.Add(tb, 1, 0);
                tb.Width = tableLayoutPanel1.Width / 2;
                tb.TextAlign = ContentAlignment.MiddleLeft;
                tableLayoutPanel1.Controls.Add(tb, 1, 0);
                tableLayoutPanel1.Padding = new Padding(0);
                tableLayoutPanel1.Margin = new Padding(0);
            */
        }

        private void CloseLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _controller.Hide(this, null);
        }

        private void button1_Click(object sender, EventArgs e)
        {

        }
    }
}
